package com.application.configuration;

import java.util.Properties;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.github.pagehelper.PageHelper;

@Configuration
public class MybatisPageHelper {
	@Bean
	public PageHelper getHelper(){
		System.out.println("MyBatisConfiguration.pageHelper()");
        PageHelper page = new PageHelper();
        Properties p = new Properties();
        p.setProperty("offsetAsPageNum", "true");
        p.setProperty("rowBoundsWithCount", "true");
        p.setProperty("reasonable", "true");
        page.setProperties(p);
        return page;
	}
}
